\(\renewcommand\AA{\unicode{x212B}}\)

Engineering Diffraction

Interface Overview

This custom interface will integrate several tasks related to engineering diffraction. In its current state it provides functionality for creating and loading calibration files and focusing ENGINX run files.

Functionality for performing single peak fitting on focused run files is currently in progress.

This interface is under active development.

General Options

RB Number
The reference number for the output paths (usually an experiment reference number at ISIS). Leaving this field empty will result in no user directories being created, and only the general directory will be used for file storage.
Instrument
Select the instrument (ENGINX or IMAT). Currently only ENGINX is fully supported.
?
Show this documentation page.
Settings
Provides a range of options that apply across the entire interface, currently providing the option to change the default output directory and force the recalculation of the vanadium correction files. The user can also select the log values from a list which are loaded with data in the fitting tab and select a log by which to sort the runs in a sequential fit.
Close
Close the interface.

Other Information

Red Stars
Red stars next to browse boxes and other fields indicate that the file could not be found. Hover over the star to see more information.
Status Bar
The status bar shows the calibration run numbers the GUI is currently using. It also displays the save directory (which can be changed in the settings).
Saved File Outputs

The location of files saved by the GUI during processing will be shown in the mantid messages log.

Note: The locations are shown at “Notice” level, so may not appear if the messages log is on the incorrect setting.

Calibration

This tab currently provides a graphical interface to create new calibrations, using the EnggCalibrate algorithm, and visualise them. It also allows for the loading of GSAS parameter files created by the calibration process to load a previously created calibration into the interface.

When loading an existing calibration, the fields for creating a new calibration will be automatically filled, allowing the recreation of the workspaces and plots generated by creating a new calibration.

The “Plot Output” check-box will plot vanadium curves and ceria peaks for new calibrations. Four plots will be generated (for ENGINX), one of each plot for each of the detector banks.

Creating a new calibration file generates 3 GSAS instrument parameter files, one covering all banks and separate ones for each individual bank. All 3 files are written to the same directory:

<CHOSEN_OUTPUT_DIRECTORY>/Calibration/

If an RB number has been specified the files will also be saved to a user directory in the base directory:

<CHOSEN_OUTPUT_DIRECTORY>/User/<RB_NUMBER>/Calibration/

Cropping

The interface also provides the ability to restrict a new calibration to one of the two banks or to a custom list of spectra.

Parameters

Vanadium Number
The run number or file path used to correct the calibration and experiment runs.
Calibration Sample Number
The run number for the calibration sample run (such as ceria) used to calibrate experiment runs.
Path
The path to the GSAS parameter file to be loaded.
Bank/Spectra
Select a bank to crop to or specify a custom spectra will be entered.
Custom Spectra
A comma separated list of spectra to restrict the calibration to. Can be provided as single spectrum numbers or ranges using hyphens (e.g. 14-150, 405, 500-600).
../../_images/EngDiff_Calibration.png ../../_images/EnggDiffExpectedVanCurve.png ../../_images/EnggDiffExpectedLinear.png

Focus

This tab allows for the focusing of data files by making use of the EnggFocus algorithm.

Files can be selected by providing run numbers or selecting the files manually using the browse button.

In order to use the tab, a new or existing calibration must be created or loaded (see above).

The interface allows for two kinds of focusing:

  • Normal Focusing:
    Run numbers can be entered and both banks will be focused for each workspace. The output workspaces will have a prefix for the run they are for and a suffix denoting which bank they are for.
  • Cropped Focusing:
    The entered workspace can be cropped to one of the two banks or to a user defined set of spectra. Workspaces cropped using custom spectra lists will have the suffix “cropped”.

Ticking the “Plot Focused Workspace” checkbox will create a plot of the focused workspace when the algorithm is complete. The number of plots that are generated is dependent on the type of focusing done. Normal focusing generates a plot for each bank and cropped focusing generates a plot for the single bank or one for the chosen spectra.

Clicking the focus button will begin the focusing algorithm for the selected run files. The button and plotting checkbox will be disabled until the fitting algorithm is complete.

The focused output files are saved in NeXus, GSS, and TOPAS format. The process will also output a CSV file containing all numerical sample logs. All of these files are saved to:

<CHOSEN_OUTPUT_DIRECTORY>/Focus/

If an RB number has been specified the files will also be saved to a user directory:

<CHOSEN_OUTPUT_DIRECTORY>/User/<RB_NUMBER>/Focus/

Parameters

Sample Run Number
The run numbers of or file paths to the data files to be focused.
Bank/Spectra
Select which bank to restrict the focusing to or allow for the entry of custom spectra.
Custom Spectra
A comma separated list of spectra to restrict the calibration to. Can be provided as single spectrum numbers or ranges using hyphens (e.g. 14-150, 405, 500-600).
../../_images/EngDiff_Focus.png ../../_images/EnggDiffExampleFocusOutput.png

Fitting

This tab will allow for single peak fitting of focused run files.

Focused run files can be loaded from the file system into mantid from the interface and converted to units TOF or d-sapcing. The interface will keep track of all the workspaces that it has created from these files. When a focussed run is loaded, the proton charge weighted average (and standard deviation) of the log values set in the settings options are calculated and stored in a grouped workspace accessible in the main mantid window.

Loaded workspaces can be plotted in the interface and the mantid fitting capability can be accessed from the ‘Fit’ button on the plot toolbar. This allows for the user to select peaks of any supported type (e.g. Pseudo-Voigt and BackToBackExponential) by right-clicking on the plot. The inital parameters can be varied interactively by dragging sliders (vertical lines on the plot). After a successful fit the best-fit model is stored as a setup in the fit browser (Setup > Custom Setup) with the name of the workspace fitted. Selecting this loads the function and the parameters and the curve can be inspected by doing Display > Plot Guess.

The output from the fit is stored in a group of workspaces that contains a matrix workspace of the fit value and error for each parameter in the model. If there is more than one of the same function, the parameters are stored in the same workspace with different x-values. For example, if there were two Gaussian peaks then there would be a workspace for each parameter of the Gaussian (i.e. Height, PeakCentre, Sigma) each of which will have two columns corresponding to each peak. Each workspace has a spectra per run loaded (each row in the table of the UI fitting tab). In general different models/functions could be fitted to each run, so when there is a parameter that does not exist for a run (or that run has not yet been fitted), the Y and E fields in the relevant row are filled with NaNs. The group of fit workspaces also contains a table workspace that stores the model string that can be copied into the fit browser (Setup > Manage Setup > Load From String).

The workspaces can be fit sequentially (sorted by the average of a chosen log in the settings). If a valid model is present in the fit browser then the Sequential Fit button (below the table in the UI) will be enabled - it is not necessary to run an initial fit. The user may want to fix or constrain certain model parameters, which can be done in the usual way in the fit browser. The sequential fit will popoulate the fit tables as above and store the model in the Custom Setups.

Parameters

Focused Run Files
A comma separated list of files to load. Selecting files from the file system using the browse button will do this for you.
Peak Positions
A comma separated list of peak positions to be used when performing the fit.
../../_images/EngDiff_Fitting.png

Categories: Interfaces | Diffraction